function newArray=maniArray(x,a)
    newArray=[];
    if isscalar(a)
        a=a*ones(1,length(x));
    end
    for i=1:length(x)
        tem2=x(i)*ones(a(i),1);
        newArray=[newArray;tem2];
    end
end
